import allure
from selenium.webdriver.common.by import By

from base.webkeys import WebKeys
from locator.allPages_data import *


class AnnouncementPage(WebKeys):
    def announcement(self):
        # 点击功能tab
        with allure.step("点击公告tab"):
            self.on_click(*the_Announcement_tab)

        with allure.step("判断公告内容成功显示"):
            locator = ("xpath", '//*[@id="index"]/div[2]/div/div[4]/div/div[1]/div[3]')
            result=self.get_text(*locator)
        return result